﻿//_______________________________________________________________________________________________________________________
// Copy Right (c) 2010, 2011 SapiensIT Consulting GmbH, all rights reserved
//_______________________________________________________________________________________________________________________
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT
// NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//_______________________________________________________________________________________________________________________
// PROJECT:     sapiens.at.SharePoint (SharePoint 2010/V4)
//_______________________________________________________________________________________________________________________
// VERSION:     2.0
//_______________________________________________________________________________________________________________________
// DESCRIPTION: 
//_______________________________________________________________________________________________________________________
// LICENSE:     Different licens Types apply to different file types:
//               - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL)
//               - Binary files are governed by MSDN CODE GALLERY BINARY LICENSE
//               - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE
//
//               The licenses can be found at the projects source location.
//               If you do not agree, don't use it!
// 
//_______________________________________________________________________________________________________________________
// Start SharePoint Branding, visit http://www.cliggin.com! Visit us on http://www.sapiens.at! Tell your friends! 
//_______________________________________________________________________________________________________________________
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace Sapiens.at.SharePoint.Entities
{
    /// <summary>
    /// Entity that represents the basic contact listitem of SharePoint.
    /// </summary>
    [ContentType(CTYPE_ID)]
    public class Contact : Item
    {
        #region Constants
        public new const string CTYPE_ID = "0x0106";
        public new static readonly SPContentTypeId CTypeId = new SPContentTypeId(CTYPE_ID);

        public const string FIRST_NAME = "FirstName";
        public const string FULL_NAME = "FullName";
        public const string EMAIL = "Email";
        public const string COMPANY = "Company";
        public const string JOB_TITLE = "JobTitle";
        public const string WORK_PHONE = "WorkPhone";
        public const string HOME_PHONE = "HomePhone";
        public const string CELL_PHONE = "CellPhone";
        public const string WORK_FAX = "WorkFax";
        public const string WORK_ADDRESS = "WorkAddress";
        public const string WORK_CITY = "WorkCity";
        public const string WORK_STATE = "WorkState";
        public const string WORK_ZIP = "WorkZip";
        public const string WORK_COUNTRY = "WorkCountry";
        public const string WEB_PAGE = "WebPage";
        public const string COMMENTS = "Comments";
        #endregion

        #region Properties
        public string FirstName
        {
            get { return Get<string>(FIRST_NAME); }
            set { Set(FIRST_NAME, value); }
        }

        public string FullName
        {
            get { return Get<string>(FULL_NAME); }
            set { Set(FULL_NAME, value); }
        }

        public string Email
        {
            get { return Get<string>(EMAIL); }
            set { Set(EMAIL, value); }
        }

        public string Company
        {
            get { return Get<string>(COMPANY); }
            set { Set(COMPANY, value); }
        }

        public string JobTitle
        {
            get { return Get<string>(JOB_TITLE); }
            set { Set(JOB_TITLE, value); }
        }

        public string WorkPhone
        {
            get { return Get<string>(WORK_PHONE); }
            set { Set(WORK_PHONE, value); }
        }

        public string HomePhone
        {
            get { return Get<string>(HOME_PHONE); }
            set { Set(HOME_PHONE, value); }
        }

        public string CellPhone
        {
            get { return Get<string>(CELL_PHONE); }
            set { Set(CELL_PHONE, value); }
        }

        public string WorkFax
        {
            get { return Get<string>(WORK_FAX); }
            set { Set(WORK_FAX, value); }
        }

        public string WorkAddress
        {
            get { return Get<string>(WORK_ADDRESS); }
            set { Set(WORK_ADDRESS, value); }
        }

        public string WorkCity
        {
            get { return Get<string>(WORK_CITY); }
            set { Set(WORK_CITY, value); }
        }

        public string WorkState
        {
            get { return Get<string>(WORK_STATE); }
            set { Set(WORK_STATE, value); }
        }

        public string WorkZip
        {
            get { return Get<string>(WORK_ZIP); }
            set { Set(WORK_ZIP, value); }
        }

        public string WorkCountry
        {
            get { return Get<string>(WORK_COUNTRY); }
            set { Set(WORK_COUNTRY, value); }
        }

        public string WebPage
        {
            get { return Get<string>(WEB_PAGE); }
            set { Set(WEB_PAGE, value); }
        }

        public string Comments
        {
            get { return Get<string>(COMMENTS); }
            set { Set(COMMENTS, value); }
        }
        #endregion

        #region Constructors
        public Contact(int id, string title) : base(id, title) { }
        public Contact(int id, string title, SPList list) : base(id, title, list) { }
        public Contact(SPItemEventProperties eventProperties, SPWeb web) : base(eventProperties, web) { }
        public Contact(SPListItem listItem) : base(listItem) { }
        public Contact(SPItemEventProperties eventProperties, SPListItem listItem, SPWeb web) : base(eventProperties, listItem, web) { }
        #endregion
    }
}